
#include <stdint.h>

#include "riscv_debug.h"
#include "target.h"


// static target_t target_riscv;

int target_riscv_init(target_t *_target)
{
    _target->probe = 0; // riscv-jtag
    _target->xlen = 32;
    _target->endian = 0;// little
    _target->err = 0;

    _target->read_reg = riscv_debug_read_register;
    _target->write_reg = riscv_debug_write_register;
    _target->read_mem = riscv_debug_read_mem;
    _target->write_mem = riscv_debug_write_mem;
    _target->breakpiont = riscv_debug_breakpiont;
    _target->resume = riscv_debug_resume;
    _target->halt = riscv_debug_halt;
    _target->reset = riscv_debug_reset;
    _target->init = riscv_debug_init;
    _target->halt_reason = riscv_debug_halt_reason;
    _target->step = riscv_debug_step;
}
